package pack0810;
import java.util.Scanner;

public class CemoA {
    public static void main(String[] args) {
        Scanner i = new Scanner(System.in);
        int num = i.nextInt();
        while(num!=0) {
            System.out.print(num % 10);
            num = num / 10;
        }
    }
}
